<?php
// 应用公共文件

if (!function_exists('unique_str')) {
    /**
     * return unique str
     * @return string
     */
    function unique_str(): string
    {
        $str =  sprintf('%04X%04X-%04X-%04X-%04X-%04X%04X%04X', mt_rand(0, 65535), mt_rand(0, 65535), mt_rand(0, 65535), mt_rand(16384, 20479), mt_rand(32768, 49151), mt_rand(0, 65535), mt_rand(0, 65535), mt_rand(0, 65535));
        return md5(str_replace('-', '', $str));
    }
}
